Skip to content

feat: custom fees - #855

Open
vgorkavenko wants to merge 15 commits into
phase-2from
feat/custom-fees
Open

feat: custom fees#855
vgorkavenko wants to merge 15 commits into
phase-2from
feat/custom-fees

Conversation

@vgorkavenko

@vgorkavenko vgorkavenko commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

  • Operators can lower fees instantly, while increases require a cooldown.
  • Allocation weight follows pending increases immediately.
  • Per-type bonuses affect effective fees without changing allocation weight.
  • Invalid fees can be normalized permissionlessly.
  • Fee parameters and cooldowns remain governance-controlled.

Checklist

  • Appropriate PR labels applied
  • Test coverage maintained (just coverage)
    • Tests are added/updated
  • Documentation maintained
    • No need to update

Base automatically changed from fix/remove-tiers to phase-2 July 16, 2026 15:58
@vgorkavenko
vgorkavenko marked this pull request as ready for review July 28, 2026 15:54
@vgorkavenko
vgorkavenko requested a review from a team as a code owner July 28, 2026 15:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7387849ebc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +216 to +219
// CustomFeeRegistry
// TODO: finalize custom fee parameters and per-type bonuses.
config.customFeeRegistryConfig.defaultMinFee = 2_500;
config.customFeeRegistryConfig.feeIncreaseCooldown = 15 days;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Populate per-type bonuses before mainnet deployment

When fee-report construction starts using this registry, leaving typeBonuses empty makes every unset operator's effective fee 8,750 BP, although this deployment config assigns the default curve 6,250 BP and other curves either 8,750 or 10,000 BP. This would overpay default-curve operators and underpay 10,000-BP types; populate the corresponding negative and positive bonuses rather than deploying the acknowledged placeholder configuration.

AGENTS.md reference: AGENTS.md:L73-L77

Useful? React with 👍 / 👎.

Comment thread test/helpers/Fixtures.sol
Comment on lines +438 to +442
deploymentConfig.customFeeRegistry = vm.parseJsonAddress(config, ".CustomFeeRegistry");
vm.label(deploymentConfig.customFeeRegistry, "customFeeRegistry");

deploymentConfig.customFeeRegistryImpl = vm.parseJsonAddress(config, ".CustomFeeRegistryImpl");
vm.label(deploymentConfig.customFeeRegistryImpl, "customFeeRegistryImpl");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard custom-registry keys for legacy artifacts

The default curated regression action uses artifacts/mainnet/curated/deploy-mainnet.json, which does not contain either new key, but every curated integration test calls this parser during initializeFromDeployment(). These unconditional parseJsonAddress calls therefore revert in test setup before the current deployed module can be tested; use keyExistsJson as with other optional/future deployment fields so pre-registry artifacts remain supported.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c32881d60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

address strikesCommittee;
StrikeThreshold[] strikesThresholds;
// CustomFeeRegistry
CustomFeeRegistryConfig customFeeRegistryConfig;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve legacy CuratedDeployParams decoding

When a regression or fork flow reads the checked-in pre-registry artifacts/mainnet/curated/deploy-mainnet.json, appending this dynamic field changes the ABI tuple layout, while updateCuratedDeployParams and parseCommonDeployParams still decode the old .CuratedDeployParams bytes as the new struct and therefore revert before tests run. Fresh evidence beyond the existing address-key comment is that guarding .CustomFeeRegistry keys would not fix this encoded-struct incompatibility; version the payload or retain a legacy decoding path with defaults.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant